package string;

/**
 *char charAt()
 * 用下表获取某个字符
 */
public class ChatAtDemo {

    public static void main(String[] args) {
                       //       111111
        //            0123456789012345
        String str = "thinking in java";
        char c = str.charAt(9);
        System.out.println(c);
       /* char d = str.charAt(16);
        System.out.println(d);*///StringIndexOutOfBoundsException数组下表越界异常

    }
}
















































































